<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <!-- <p style="color: red; font-size: 40px">hello Vue!</p> -->

      <!-- :style也允许写成对象的形式，key还是css类名，value是变量或者表达式 -->
      <!-- 固定的值要加引号，连字符要转成小驼峰 -->
      <p
        :style="{ color: 'red', fontSize: size + 'px', transform: 'translate(' + tst + 'px)' }"
      >
        hello Vue!
      </p>

      <button @click="tst += 50">btn</button>
    </div>

    <script src="../Vue.js"></script>
    <script>
      new Vue({
        el: "#app",
        data: {
          size: 40,
          tst: 200,
        },
      });
    </script>
  </body>
</html>
